package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.mapper.master.enums.DriverRechargePayMethod;
import com.njtoyo.taxi.admin.mapper.master.enums.DriverRechargeState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Dell
 * @since 2021-11-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "DriverRecharge对象", description = "")
public class DriverRecharge implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "司机Id")
    private Long driverId;

    @ApiModelProperty(value = "订单号")
    private String number;

    @ApiModelProperty(value = "外部订单号")
    private String outTradeNumber;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "支付方式: 0:unknown(未知), 1:point(积分),2:wechat(微信原生支付),3:jy_wechat(江阴农商行支付),4:alipay(支付宝),5:unionpay(云闪付),6:saving(余额)")
    private DriverRechargePayMethod payMethod;

    @ApiModelProperty(value = "实际支付")
    private BigDecimal farePaid;

    @ApiModelProperty(value = "余额支付")
    private BigDecimal balancePaid;

    @ApiModelProperty(value = "支付时间")
    private LocalDateTime lastPaidTime;

    @ApiModelProperty(value = "支付状态：0:init,1:operated,2:front_end_done,3:done,4:cancelled,5:failed,6:rejected")
    private DriverRechargeState state;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

}
